//
//  UserModel.m
//  消费100
//
//  Created by eliot on 16/5/23.
//  Copyright © 2016年 aleven. All rights reserved.
//

#import "UserModel.h"

@implementation UserModel
- (id) initWithCoder: (NSCoder *)Decoder {
    if(self = [super init])
    {
        self.amount = [Decoder decodeObjectForKey:@"amount"];
        self.coins = [Decoder decodeObjectForKey:@"coins"];
        self.nickName = [Decoder decodeObjectForKey:@"nickName"];
        self.id = [Decoder decodeObjectForKey:@"id"];
        self.img = [Decoder decodeObjectForKey:@"img"];
        self.level = [Decoder decodeObjectForKey:@"level"];
        self.invite = [Decoder decodeObjectForKey:@"invite"];
        self.name = [Decoder decodeObjectForKey:@"name"];
        self.phone = [Decoder decodeObjectForKey:@"phone"];
        self.pwd = [Decoder decodeObjectForKey:@"pwd"];
        self.state = [Decoder decodeObjectForKey:@"state"];
        self.tradePwd = [Decoder decodeObjectForKey:@"tradePwd"];
        self.createDate = [Decoder decodeObjectForKey:@"createDate"];
        self.modifyDate = [Decoder decodeObjectForKey:@"modifyDate"];
    }
    return self;
}

- (void)encodeWithCoder: (NSCoder *)coder {
    [coder encodeObject:self.amount forKey:@"amount"];
    [coder encodeObject:self.coins forKey:@"coins"];
    [coder encodeObject:self.id forKey:@"id"];
    [coder encodeObject:self.img forKey:@"img"];
    [coder encodeObject:self.level forKey:@"level"];
    [coder encodeObject:self.invite forKey:@"invite"];
    [coder encodeObject:self.name forKey:@"name"];
    [coder encodeObject:self.pwd forKey:@"pwd"];
    [coder encodeObject:self.state forKey:@"state"];
    [coder encodeObject:self.tradePwd forKey:@"tradePwd"];
    [coder encodeObject:self.createDate forKey:@"createDate"];
    [coder encodeObject:self.modifyDate forKey:@"modifyDate"];
    [coder encodeObject:self.phone forKey:@"phone"];
    [coder encodeObject:self.nickName forKey:@"nickName"];
}

@end
